<!--
  Generated template for the MyFavoritesPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>代理商品订购</ion-title>
  </ion-navbar>
  <ion-toolbar no-border-top ion-fixed>
    <ion-segment [(ngModel)]="which">
      <ion-segment-button value="market">超市</ion-segment-button>
      <ion-segment-button value="food">餐饮</ion-segment-button>
      <ion-segment-button value="hotel">酒店</ion-segment-button>
      <ion-segment-button value="ticket">门票</ion-segment-button>
    </ion-segment>
  </ion-toolbar>
</ion-header>


<ion-content padding>

  <div [ngSwitch]="which">
    <ion-list *ngSwitchCase="'market'">
      <ion-card *ngFor="let items of marketCards;let i = index" (click)="forPage(items,which)">
        <img src="{{items.src}}"/>
        <ion-card-content>
          <ion-card-title>
            {{items.name}}
          </ion-card-title>
        </ion-card-content>
      </ion-card>
    </ion-list>
    <div *ngSwitchCase="'food'">
      <ion-card *ngFor="let items of foodCards;let i = index" (click)="forPage(items,which)">
        <img src="{{items.src}}"/>
        <ion-card-content>
          <ion-card-title>
            {{items.name}}
          </ion-card-title>
        </ion-card-content>
      </ion-card>
    </div>
    <div *ngSwitchCase="'hotel'">
      <ion-card *ngFor="let items of hotelCards;let i = index" (click)="forPage(items,which)">
        <img src="{{items.src}}"/>
        <ion-card-content>
          <ion-card-title>
            {{items.name}}
          </ion-card-title>
        </ion-card-content>
      </ion-card>
    </div>
    <div *ngSwitchCase="'ticket'">
      <ion-card *ngFor="let items of merTicketCards;let i = index" (click)="forPage(items,which)">
        <img src="{{items.src}}"/>
        <ion-card-content>
          <ion-card-title>
            {{items.name}}
          </ion-card-title>
        </ion-card-content>
      </ion-card>
    </div>
  </div>
</ion-content>
